﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Forms;
using System.Drawing;
using UnityScriptEngine;

namespace ResortModule
{
    static class Common
    {
        public static string Username = "";
        public static string Password = "";
        public static string StaffOfTheDay = "";
        public static bool UserLogged = false;
        
        public static string referenceNumber = "";
        public static string guestName = "";

        public static DataTable functionRateLookUp = new DataTable();
        public static DataTable packageLookUp = new DataTable();
        public static DataTable roomRateLookUp = new DataTable();
        
        /*
        public static DataTable displayLookup()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("KS Building");
            dt.Columns.Add("Barasoain Building");
            dt.Columns.Add("Maharlika Building");
            dt.Columns.Add("Centennial Building");

            dt.Rows.Add(dt.NewRow());
            int rw = 0;
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                rw = 0;
                for (int i = 0; i < hotelRoomlookup.Rows.Count; i++)
                {
                    string data_field = hotelRoomlookup.Rows[i]["fBuildingName"].ToString();
                    if (data_field.Equals(dt.Columns[j].ColumnName))
                    {
                        if (j == 0)
                        {
                            if ((dt.Rows[rw][j].ToString() != ""))
                            {
                                dt.Rows.Add(dt.NewRow());
                                rw++;
                                dt.Rows[rw][j] = hotelRoomlookup.Rows[i]["fRoomNumber"].ToString();
                            }
                            else
                            {
                                dt.Rows[rw][j] = hotelRoomlookup.Rows[i]["fRoomNumber"].ToString();
                            }
                        }
                        else
                        {
                            if (dt.Rows.Count > rw)
                            {
                                dt.Rows[rw][j] = hotelRoomlookup.Rows[i]["fRoomNumber"].ToString();
                                rw++;
                            }
                            else
                            {
                                dt.Rows.Add(dt.NewRow());
                                dt.Rows[rw][j] = hotelRoomlookup.Rows[i]["fRoomNumber"].ToString();
                                rw++;
                            }
                        }
                    }
                }
            }
            return dt;


        }
        public static DataTable displayFunctionLookup()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("AM");
            dt.Columns.Add("PM");
            
            dt.Rows.Add(dt.NewRow());
            int rw = 0;
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                rw = 0;
                for (int i = 0; i < functionHallLookUp.Rows.Count; i++)
                {
                    string data_field = functionHallLookUp.Rows[i]["fTime"].ToString();
                    if (data_field.Equals(dt.Columns[j].ColumnName))
                    {
                        if (j == 0)
                        {
                            if ((dt.Rows[rw][j].ToString() != ""))
                            {
                                dt.Rows.Add(dt.NewRow());
                                rw++;
                                dt.Rows[rw][j] = functionHallLookUp.Rows[i]["fFunctionHall"].ToString();
                            }
                            else
                            {
                                dt.Rows[rw][j] = functionHallLookUp.Rows[i]["fFunctionHall"].ToString();
                            }
                        }
                        else
                        {
                            if (dt.Rows.Count > rw)
                            {
                                dt.Rows[rw][j] = functionHallLookUp.Rows[i]["fFunctionHall"].ToString();
                                rw++;
                            }
                            else
                            {
                                dt.Rows.Add(dt.NewRow());
                                dt.Rows[rw][j] = functionHallLookUp.Rows[i]["fFunctionHall"].ToString();
                                rw++;
                            }
                        }
                    }
                }
            }
            return dt;


        }
        */

        
    }

}